#include <bits/stdc++.h>
using namespace std;

int n, a[105], b[105];

int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i)
    cin >> a[i];
  for (int i = 1; i <= n; ++i)
    b[i] = a[i];
  sort(&b[1], &b[n + 1]);
  for (int i = 1; i <= n; ++i) {
    for (int j = n; j >= 1; --j) {
      if (a[i] == b[j]) {
        cout << n - j + 1 << endl;
        break;
      }
    }
  }
  return 0;
}
